package behavior.state.impl;

import behavior.state.Room;
import behavior.state.State;

public class BookedState implements State {

	Room room;

	public BookedState(Room room) {
		this.room = room;
	}

	public void bookRoom() {
		System.out.println(room.getRootId() + "号房间已近给预定了...");
	}

	public void checkInRoom() {
		System.out.println(room.getRootId() + "号房间入住成功...");
		room.setState(room.getCheckInState()); // 状态变成入住
	}

	public void checkOutRoom() {
		// 不需要做操作
	}

	public void unsubscribeRoom() {
		System.out.println(room.getRootId() + "号房间退订成功,欢迎下次光临...");
		room.setState(room.getFreeTimeState()); // 变成空闲状态
	}

}
